1. Field of the Disclosure
This disclosure relates generally to computer systems; and more particularly, it is directed to the simulation of bristle brush behavior in an image editing application using stiffness-height parameterization.
2. Description of the Related Art
Digital image editing is the process of creating and/or modifying digital images using a computer system. Using specialized software programs, users may manipulate and transform images in a variety of ways. These digital image editors may include programs of differing complexity, such as limited-purpose programs associated with acquisition devices (e.g., digital cameras and scanners with bundled or built-in programs for managing brightness and contrast); limited editors suitable for relatively simple operations such as rotating and cropping images; and professional-grade programs with large and complex feature sets.
Digital images may include raster graphics, vector graphics, or a combination thereof. Raster graphics data (also referred to herein as bitmaps) may be stored and manipulated as a grid of individual picture elements called pixels. A bitmap may be characterized by its width and height in pixels and also by the number of bits per pixel. Commonly, a color bitmap defined in the RGB (red, green blue) color space may comprise between one and eight bits per pixel for each of the red, green, and blue channels. Another commonly used representation is a CMYK color space. In these and other color space representations, an alpha channel may be used to store additional data such as per-pixel transparency values (or the inverse-opacity values). For example, per-pixel data representing paint on a brush tool or on a canvas may include a set of color values (e.g., one per channel) and an opacity value for the paint.
An operation often provided by a digital image editor is the use of a virtual “paintbrush” (also referred to herein as a “brush” or a “brush tool”) to modify a digital image by depositing virtual paint or virtual ink. Various prior approaches have attempted to model a real-world brush and its behavior in the context of such an operation. For example, a two-dimensional (2D) raster image may be created to represent the shape of the brush as it contacts the canvas, and the 2D image may be stamped repeatedly along the input path. In another approach, a vector representation of the brush tip has been used instead of a 2D raster image. In some systems, a brush tip is represented as a single triangle mesh.
Typical brush simulations use a static mapping of stylus pressure to brush height that does not vary with bristle stiffness. As such, they are not able to reproduce the behavior of a variety of different bristle stiffness values. Some existing brush simulations use a haptic feedback device as input, but such devices are not in widespread commercial use. In addition, these simulations typically focus on the forces of the fluid simulation and not on bristle stiffness. Other existing brush simulations use physical brushes as input to painting simulations, requiring an elaborate hardware setup not available to end users.